#pragma once

#include <jni.h>


extern JNIEnv * gJavaEnv;


struct JavaMethodCacheSound
{
	jclass main_class;
	jmethodID registerSound;
	jmethodID unRegisterSound;
	jmethodID playSound;
	jmethodID stopSound;
	jmethodID setVolume;
	
	JavaMethodCacheSound()
	:	main_class(0),
		registerSound(0),
		unRegisterSound(0),
		playSound(0),
		stopSound(0),
		setVolume(0)
	{}

	~JavaMethodCacheSound()
	{
		if ( main_class )
		    gJavaEnv->DeleteLocalRef( main_class );
	}
};


extern JavaMethodCacheSound *method_cache_sound;


void check_method_cache_sound();
